Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rate limit for network #400

Merged
merged 1 commit into from
Sep 30, 2024
Merged

feat: add rate limit for network #400

merged 1 commit into from
Sep 30, 2024

Conversation

gaius-qi
Copy link
Member

@gaius-qi gaius-qi commented Sep 30, 2024

Description

This pull request includes several changes to the dragonfly-api project, focusing on version updates, validation rules, and enhancements to the network message definitions across multiple files.

Version Update:

  • Updated the version of the dragonfly-api package in Cargo.toml from 2.0.162 to 2.0.163.

Validation Rules:

  • Added placeholders for validation rules for new fields in the Network struct in pkg/apis/common/v2/common.pb.validate.go.

Network Message Enhancements:

  • Added new fields (download_rate, download_rate_limit, upload_rate, upload_rate_limit) to the Network message in pkg/apis/common/v2/common.proto and proto/common.proto. [1] [2]
  • Updated the Network struct in src/common.v2.rs to include the new fields for download and upload rates and their limits.

Documentation Improvements:

  • Improved documentation for the PersistentCachePeer and PersistentCacheTask structs in src/common.v2.rs to clarify the conditions under which persistent cache items are deleted. [1] [2]

Related Issue

Motivation and Context

@gaius-qi gaius-qi added the enhancement New feature or request label Sep 30, 2024
@gaius-qi gaius-qi self-assigned this Sep 30, 2024
@gaius-qi gaius-qi requested a review from a team as a code owner September 30, 2024 08:26
@gaius-qi
Copy link
Member Author

This pull request includes several updates to the dragonfly-api package, primarily focusing on adding new fields to the Network message in various files and clarifying comments in the Rust structs. Here are the most important changes:

Version Update:

  • Cargo.toml: Updated the package version from 2.0.162 to 2.0.163.

Protobuf Schema Changes:

Validation Rules:

Rust Structs Documentation:

  • src/common.v2.rs: Clarified comments for PersistentCachePeer and PersistentCacheTask structs regarding when they are deleted. [1] [2]
  • src/common.v2.rs: Added new fields for download and upload rates and their limits to the Network struct.

Copy link
Member

@yxxhero yxxhero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi gaius-qi merged commit b5432fb into main Sep 30, 2024
6 checks passed
@gaius-qi gaius-qi deleted the feature/rate branch September 30, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants